function init(page){
	const systemInfo = uni.getSystemInfoSync();
	getApp().globalData.bluetoothEnabled=systemInfo.bluetoothEnabled;
	getApp().globalData.cameraAuthorized=systemInfo.cameraAuthorized;
	getApp().globalData.deviceOrientation=systemInfo.deviceOrientation;
	getApp().globalData.deviceOrientation=systemInfo.deviceOrientation;
	getApp().globalData.devicePixelRatio=systemInfo.devicePixelRatio;
	getApp().globalData.fontSizeSetting=systemInfo.fontSizeSetting;
	getApp().globalData.language=systemInfo.language;
	getApp().globalData.locationAuthorized=systemInfo.locationAuthorized;
	getApp().globalData.locationEnabled=systemInfo.locationEnabled;
	getApp().globalData.microphoneAuthorized=systemInfo.microphoneAuthorized;
	getApp().globalData.model=systemInfo.model;
	getApp().globalData.notificationAuthorized=systemInfo.notificationAuthorized;
	getApp().globalData.pixelRatio=systemInfo.pixelRatio;
	getApp().globalData.screenHeight=systemInfo.screenHeight;
	getApp().globalData.screenWidth=systemInfo.screenWidth;
	getApp().globalData.windowHeight=systemInfo.windowHeight;
	getApp().globalData.windowWidth=systemInfo.windowWidth;
	getApp().globalData.defaultSwiperHeight=systemInfo.windowWidth * 2 / 3;
	getApp().globalData.statusBarHeight=systemInfo.statusBarHeight;
	getApp().globalData.wifiEnabled=systemInfo.wifiEnabled;
	getApp().globalData.system=systemInfo.system;
	getApp().globalData.version=systemInfo.version;
	getApp().globalData.appVersion=systemInfo.appVersion;
	//#ifdef MP-WEIXIN
	const menuButtonInfo = uni.getMenuButtonBoundingClientRect();
	getApp().globalData.menuTop = menuButtonInfo.top;
	getApp().globalData.menuBottom = menuButtonInfo.bottom;
	getApp().globalData.menuHeight = menuButtonInfo.height;
	getApp().globalData.menuWidth = menuButtonInfo.width;
	getApp().globalData.menuLeft = menuButtonInfo.left;
	getApp().globalData.menuRight = menuButtonInfo.right;
	//#endif
	if(getApp().globalData.menuHeight == null){
		getApp().globalData.menuHeight = 40;
	}
	if(getApp().globalData.menuTop == null){
		getApp().globalData.menuTop = 10;
	}
	getApp().globalData.topMenuHeight = getApp().globalData.menuHeight + (getApp().globalData.menuTop - getApp().globalData.statusBarHeight) * 2;
	getApp().globalData.topMenuWithStatusBarHeight = getApp().globalData.menuHeight + getApp().globalData.statusBarHeight + getApp().globalData.menuTop;
	getApp().globalData.topMenuWithSpaceHeight = getApp().globalData.menuBottom + (getApp().globalData.menuTop - getApp().globalData.statusBarHeight);
	getApp().globalData.containerHeight = systemInfo.windowHeight - getApp().globalData.topMenuHeight;
	
	getApp().globalData.corb='#33b4ff';
	getApp().globalData.corg='#cccccc';
	getApp().globalData.corhb='#999999';
	getApp().globalData.corfb='#666666';
	getApp().globalData.coro='#f39801';
	getApp().globalData.corr='#ed1c24';
	getApp().globalData.corgw='#f1f1f1';
	getApp().globalData.corw='#ffffff';
	page.setting=getApp().globalData;
}

function showError(msg, callback){
	uni.showModal({
		title: '温馨提示',
		content: msg,
		showCancel: false, 
		confirmColor: getApp().globalData.corr,
		confirmText: '知道了',
		success: function(res){
			if(res.confirm){
				if(callback!=null){
					callback();
				}
			}
		}
	})
}

function showInfo(msg, callback){
	uni.showModal({
		title: '温馨提示',
		content: msg,
		showCancel: false, 
		confirmColor: getApp().globalData.corb,
		confirmText: '知道了',
		success: function(res){
			if(res.confirm){
				if(callback!=null){
					callback();
				}
			}
		}
	})
}

export default{
	init,
	showError,
	showInfo
}
